<template>
  <div>
    <h2>我是hello组件</h2>
  </div>
</template>

<script>
/**
 * 网络请求，采用自己封装的网络请求
 */
import {request} from "network/request"
export default {
  name: "Hello",
  /**
   * 组件创建时调用
   */
  created() {
    request({
      url: '/api'
    }).then(data=>{
      console.log(data);
    })
  }
}
</script>

<style scoped>

</style>